package com.iplant.aps.service.mesenum;

/**
 * 工序类型
 *
 * @author YouWang·Peng
 * 2022-11-2 11:19:17
 */
public enum FPCPartPointType {
    /**
     * 默认
     */
    Default(0, "默认"),
    /**
     * 预检工序
     */
    L1(1, "预检工序"),
    /**
     * 拆解工序
     */
    L2(2, "拆解工序"),
    /**
     * 清洁工序
     */
    L3(3, "清洁工序"),
    /**
     * 检修工序
     */
    L4(4, "检修工序"),
    /**
     * 焊接工序
     */
    L5(5, "焊接工序"),
    /**
     * 组装工序
     */
    L6(6, "组装工序"),
    /**
     * 清洁工序
     */
    L7(7, "清洁工序"),
    /**
     * 试验工序
     */
    L8(8, "试验工序"),
    /**
     * 加工工序
     */
    L9(9, "加工工序");

    private final int value;
    private final String lable;

    FPCPartPointType(int value, String lable) {
        this.value = value;
        this.lable = lable;
    }

    /**
     * 通过 value 的数值获取枚举实例
     */
    public static FPCPartPointType getEnumType(int val) {
        for (FPCPartPointType type : FPCPartPointType.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return FPCPartPointType.Default;
    }

    public int getValue() {
        return value;
    }

    public String getLable() {
        return lable;
    }
}
